﻿#ifndef INI_FILE_H
#define INI_FILE_H

#include <QString>
#include <QSettings>
#include <QTextCodec>

class INI_File
{
public:
    INI_File();
    virtual ~INI_File();

    void CreateFile(QString qstrFilePath, QString qstrFileName);

    void SetRememberConfig(QString qstrRemember);
    QString GetRememberConfig();

    void SetServerIP(QString qstrIp);
    QString GetServerIP();

    QString GetPortLoginUser();
    QString GetPortPostMesg();
    QString GetPortPostFile();
    QString GetPortAuthByMac();
    QString GetPortAuthByIP();
    QString GetPortAuthByDomainUser();
    QString GetClientExit();
    QString GetSendShareMessage();
    QString GetJobList();
    QString DeleteJob();

    void SetTitleBackgroudColor(QString qstrTitleBackgroudColor);
    QString GetTitleBackgroudColor();

    void SetDurationTime(QString qstrDurationTime);
    QString GetDurationTime();

    void SetListenPort(QString qstrListenPort);
    QString GetListenPort();

    void SetMode(int qstrMode);
    int GetMode();

    void SetUserName(QString qstrUserName);
    QString GetUserName();

    void SetPassWord(QString qstrPassWord);
    QString GetPassWord();

    void SetMac(QString qstrMac);
    QString GetMac();


    void SetTerminaltype(QString qstrTerminaltype);
    QString GetTerminaltype();


    void SetPortShared(QString qstrPortShared);
    QString GetPortShared();


    void SetDefaultprinter(QString qstrDefaultprinter);
    QString GetDefaultprinter();


    void SetDefaultprinterName(QString qstrDefaultprinterName);
    QString GetDefaultprinterName();


    void SetIsServerMode(QString qstrIsServerMode);
    QString GetIsServerMode();


    void SetDocPath(QString qstrDocPath);
    QString GetDocPath();

    void SetServerNodes(QString qstrServerNodes);
    QString GetServerNodes();

    void SetTitle(QString qstrTitle);
    QString GetTitle();
private:
    QString m_qstrFileName;
    QSettings *m_psetting;
};

#endif // INI_FILE_H
